package dk.contix.eclipse.hudson.views;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.IStructuredSelection;

public final class OpenBrowserAction extends Action {
	private final HudsonView hudsonView;

	public OpenBrowserAction(HudsonView hudsonView) {
		this.hudsonView = hudsonView;
	}

	@Override
	public void run() {
		IStructuredSelection sel = (IStructuredSelection) hudsonView.viewer.getSelection();
		hudsonView.openBrowser(sel);
	}

}
